package qq2564874169.tuaotuao.fx;

import java.util.Objects;

public class Tuple<T1, T2> {
    public T1 v1;
    public T2 v2;

    public Tuple() {

    }

    public Tuple(T1 value1, T2 value2) {
        this.v1 = value1;
        this.v2 = value2;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        Tuple<?, ?> tuple = (Tuple<?, ?>) o;

        if (!Objects.equals(v1, tuple.v1)) return false;
        return Objects.equals(v2, tuple.v2);
    }

    @Override
    public int hashCode() {
        int result = v1 != null ? v1.hashCode() : 0;
        result = 31 * result + (v2 != null ? v2.hashCode() : 0);
        return result;
    }
}
